import request from '@/util/request';

export default {
    findAllUsers() {
        return request({
            url: '/user/list',
            method: 'get',
        })
    },
    findByPage(page, pageSize) {
        return request({
            url: `/user/findByPage/${page}/${pageSize}`,
            method: "get"
        })
    },
    search(page, pageSize, data) {
        return request({
            url: `/user/search/${page}/${pageSize}`,
            method: "post",
            data
        })
    },
    saveUsers(url, data, method) {
        return request({
            url,
            method,
            data
        })
    },
    deleteUser(ids) {
        return request({
            url: `/user/delete/${ids}`,
            method: "delete"
        })
    },
}
